]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
css: Define a higher contrast insensitive text style for card elements
authorSam Hewitt <snwh@gnome.org>
Wed, 10 Dec 2025 14:46:37 +0000 (11:16 -0330)
committerSam Hewitt <snwh@gnome.org>
Wed, 10 Dec 2025 14:46:37 +0000 (11:16 -0330)
- fixes an oversight in color definitions for insensitive style text on cards where contrast was insufficient

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8683
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3998>

data/theme/gnome-shell-sass/_colors.scss
data/theme/gnome-shell-sass/_high-contrast-colors.scss
data/theme/gnome-shell-sass/widgets/_calendar.scss
data/theme/gnome-shell-sass/widgets/_message-list.scss

index 0412e4f420d3b0043b6f497bc174fb7514dca6c3..3a7d49c7caaeea498b8893c95ad37ac961c04adc 100644 (file)
@@ -68,3 +68,10 @@ $active_fg_color: if($variant=='light', darken($fg_color, 11%), lighten($fg_colo
 
 // accent colors
 $accent_borders_color: if($variant== 'light', st-darken(-st-accent-color, 20%), st-lighten(-st-accent-color, 30%));
+
+//
+// Special Case Colors
+//
+
+// increase contrast on insensitive_fg_color since card elements have a lighter background
+$card_insensitive_fg_color: if($variant =='light', darken($insensitive_fg_color, 5%), lighten($insensitive_fg_color, 9%));
\ No newline at end of file
index ac622cbdef7b71ec6bb9c0c47d984dabddbd67b1..40c9074acac9dfba6a68dd588377aed0953794c4 100644 (file)
@@ -67,6 +67,12 @@ $active_fg_color: lighten($fg_color, 22%);
 // accent colors
 $accent_borders_color: st-lighten(-st-accent-color, 30%);
 
+//
+// Special Case Colors
+//
+
+$card_insensitive_fg_color: $fg_color;
+
 //
 // High Contrast specific definitions
 //
index a4c6a88708979cb2740adac91d897fa55022f03b..bb9852f5eb184ab2b1a03209a6a4c055d87496ea 100644 (file)
     // event title
     .events-title {
       @extend %heading;
-      color: $insensitive_fg_color;
+      color: $card_insensitive_fg_color;
       padding-bottom: $base_padding;
     }
 
         .event-time {
           @extend %numeric;
           @extend %caption;
-          color: $insensitive_fg_color;
+          color: $card_insensitive_fg_color;
         }
       }
 
       .event-placeholder {
-        color: $insensitive_fg_color;
+        color: $card_insensitive_fg_color;
         font-style: italic;
       }
     }
   // title
   .world-clocks-header {
     @extend %heading;
-    color: $insensitive_fg_color;
+    color: $card_insensitive_fg_color;
 
     // change style when no world clocks are configured
     &.no-world-clocks {
     .world-clocks-timezone {
       @extend %numeric;
       @extend %caption;
-      color: $insensitive_fg_color;
+      color: $card_insensitive_fg_color;
     }
   }
 }
 
       .weather-header {
         @extend %heading;
-        color: $insensitive_fg_color;
+        color: $card_insensitive_fg_color;
 
          // change style when no location is configured
         &.no-location {
index 5e8812f7c7e68c43ac0e8436a2a77fa5f5d91dd3..6be1400b4a939af8d0b188e54b8a959d2c5679b0 100644 (file)
@@ -99,7 +99,7 @@
   // message header
   .message-header {
     spacing: $base_padding;
-    color: $insensitive_fg_color;
+    color: $card_insensitive_fg_color;
     padding:0 $base_padding;
 
     // remove side padding to accommodate the close button
       // Time label
       .event-time {
         @extend %caption;
-        color: $insensitive_fg_color;
+        color: $card_insensitive_fg_color;
         // Add bottom padding to align the app name with the time horizontally
         padding-bottom: to_em(1px);